<?php
namespace Ipartek\BlogBundle\Admin;

use Sonata\AdminBundle\Admin\Admin;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper;


/**
 * NoticiaAdmin
 *
 */
class NoticiaAdmin extends Admin{
	
	protected function configureFormFields(FormMapper $formMapper)
	{
		$formMapper
		->add('tipo')
		->add('created_at')
		->add('modified_at')
		->add('title')
		->add('slug')
		->add('excerpt')
		->add('content')
		->add('categoria')
		;
	}
	
	protected function configureDatagridFilters(DatagridMapper $datagridMapper)
	{
		$datagridMapper
		->add('tipo')		
		->add('title')		
		->add('excerpt')
		->add('content')
		->add('categoria')
		;
	}
	
	protected function configureListFields(ListMapper $listMapper)
	{
		$listMapper
		->addIdentifier('title')
		->add('tipo')
		->add('created_at')
		->add('modified_at')		
		->add('excerpt')		
		->add('categoria')
		;
	}

}